package com.zbkj.service.assistant.model.request;

import cn.hutool.core.util.ObjUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class AssistantConversationHistorySearchRequest {

    @ApiModelProperty(value = "来源")
    private Integer source;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "评分")
    private Integer evaluationRating;

    @ApiModelProperty(value = "时间类型 queueStartTime，sessionStartTime，sessionEndTime，evaluationTime")
    private String timeType;
    @ApiModelProperty(value = "开始时间")
    private String startTime;
    @ApiModelProperty(value = "结束时间")
    private String endTime;

    @ApiModelProperty(value = "关键字类型 userNickname，userPhone，serviceName")
    private String keywordType;
    @ApiModelProperty(value = "关键字")
    private String keywords;

    @JsonIgnore
    public String getEndTimeStr() {
        if (ObjUtil.isNotEmpty(endTime)) {
            return endTime + " 23:59:59";
        }
        return null;
    }
}
